package com.fubang.pathlearning.circleprogress;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.fubang.pathlearning.R;

public class CircleProgressActivity extends AppCompatActivity {

    private CircleNumberProgress mCircle;
    private float mPercent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_circle_progress);
        mCircle = (CircleNumberProgress) findViewById(R.id.circle);
        mCircle.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mPercent = (float) (Math.random() * 100);
                mCircle.setCurrentPercent(mPercent);
            }
        });

    }
}
